'''
Created on Aug 20, 2019

@author: yc
'''
import requests

def getText(url):
    return requests.get(url).text

def getJson(url):
    return requests.get(url).json()

def getWindowInfo():
    url = "http://127.0.0.1:8000/windowInfo"
    return getJson(url)
#     print("h=", windowInfo.get("space_width"))
    
def getMazeInfo():
    url = "http://127.0.0.1:8000/mazeInfo"
    return getJson(url)

def getCarInfo():
    url = "http://127.0.0.1:8000/carInfo"
#     res = getJson(url)
#     print(res.get("location"))
    return getJson(url)

if __name__ == "__main__":
    getCarInfo()

